import http from '@/utils/http.js'
import config from '@/config/config.js'


// 报修管理查询
export const selectConfigFlowRepairBlock = (data) => {
	// const url = `/special/dictionary/baseconfig/FlowRepair/select/`
	const url = `/special/dictionary/baseconfig/FlowRepair/selectApp/`
	return http.get(url,data)
}


// 报修管理新增
export const insertConfigFlowRepairBlock = (data) => {
	const url = `/special/dictionary/baseconfig/FlowRepair/insert/`
	return http.post(url,data)
}



// 报事管理查询
export const flowComplaints = (data) => {
	// const url = `/special/dictionary/baseconfig/FlowComplaints/select/`
	const url = `/special/dictionary/baseconfig/FlowComplaints/selectApp/`
	return http.get(url,data)
}

// 报事管理编辑
export const flowComplaintsIinsert = (data) => {
	const url = `/special/dictionary/baseconfig/FlowComplaints/insert/`
	return http.post(url,data)
}


// 维修查询 、回访
export const flowRepair = (data) => {
	// const url = `/special/dictionary/baseconfig/FlowRepair/select/`
	const url = `/special/dictionary/baseconfig/FlowRepair/selectApp/`
	return http.get(url,data)
}

// 维修查询 、回访提交
export const flowRepairEdit = (data) => {
	const url = `/special/dictionary/baseconfig/FlowRepair/edit/`
	return http.put(url,data)
}



//查询房间号
export const selectByOwnerId = () => {
	var ownerId = uni.getStorageSync("ownerId");
	var data = {};
	data.ownerId = ownerId;
	const url = `/special/dictionary/baseconfig/OwnerUser/selectByOwnerId/` + ownerId
	return http.get(url,data)
}

//文件上传
export const fileUpload = (data) => {
	const url = `/special/dictionary/files/upload/`
	return http.post(url,data)
}

//版本更新
export const getAppVersion = (data) => {
	const url = `/special/dictionary/baseconfig/ConfigFeeItem/appUpdate`
	return http.get(url,data)
}

// 缴费管理查询
export const selectConfigPaymentBillBlock = (data) => {
	const url = `/special/dictionary/baseconfig/PaymentBill/selectApp/`
	return http.get(url,data)
}

// 缴费管理新增
export const insertConfigPaymentBillBlock = (data) => {
	const url = `/special/dictionary/baseconfig/PaymentBill/insert/`
	return http.post(url,data)
}


// 缴费管理编辑
export const editConfigPaymentBillBlock = (data) => {
	const url = `/special/dictionary/baseconfig/PaymentBill/edit/`
	return http.put(url,data)
}


//查询个人信息
export const getUserInfo = (data) => {
	const url = `/special/dictionary/baseconfig/OwnerUser/selectApp/`
	return http.get(url,data)
}


//修改个人信息
export const editUserInfo = (data) => {
	const url = `/special/dictionary/baseconfig/OwnerUser/edit`
	return http.put(url,data)
}


// 当日已维修查询
export const flowRepairSelectToday = (data) => {
	const url = `/special/dictionary/baseconfig/FlowRepair/selectToday/`
	return http.get(url,data)
}


// 当日缴费查询
export const paymentBillSelectToday = (data) => {
	const url = `/special/dictionary/baseconfig/PaymentBill/selectToday/`
	return http.get(url,data)
}

//每日巡检查询
export const flowInspectionDaySelect = (data) => {
	const url = `/special/dictionary/baseconfig/FlowInspectionDay/select`
	return http.get(url,data)
}

//每日巡检新增
export const flowInspectionDayInsert = (data) => {
	const url = `/special/dictionary/baseconfig/FlowInspectionDay/insert`
	return http.post(url,data)
}

//每日巡检修改
export const flowInspectionDayEdit = (data) => {
	const url = `/special/dictionary/baseconfig/FlowInspectionDay/edit`
	return http.put(url,data)
}

//每日巡检删除
export const flowInspectionDayDelete = (data) => {
	const url = `/special/dictionary/baseconfig/FlowInspectionDay/delete/` + data.id
	return http.delete(url,data)
}

//警卫巡检查询
export const flowInspectionGuardSelect = (data) => {
	const url = `/special/dictionary/baseconfig/FlowInspectionGuard/select`
	return http.get(url,data)
}

//警卫巡检新增
export const flowInspectionGuardInsert = (data) => {
	const url = `/special/dictionary/baseconfig/FlowInspectionGuard/insert`
	return http.post(url,data)
}

//警卫巡检修改
export const flowInspectionGuardEdit = (data) => {
	const url = `/special/dictionary/baseconfig/FlowInspectionGuard/edit`
	return http.put(url,data)
}

//警卫巡检删除
export const flowInspectionGuardDelete = (data) => {
	const url = `/special/dictionary/baseconfig/FlowInspectionGuard/delete/` + data.id
	return http.delete(url,data)
}

